<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>在线相册信息管理</title>
    <script>
        //自定义执行信息删除提示判断，参数uu是成功的删除url地址
        function toDel(uu){
            if(confirm("确定要删除吗？")){
                //网页跳转
                window.location=uu;
            }
        }
    </script>
</head>
<body>
    <center>{% include "myapp/menu.html" %}</center>
    <center>
    <h3>相册信息</h3>
    <table width="800" border="1" cellspacing="0">
        <tr>
            <th>id号</th>
            <th>标题</th>
            <th>图片</th>
            <th>分辨率(像素)</th>
            <th>最后修改时间</th>
            <th>备注</th>
            <th>操作</th>
        </tr>
        {% for p in plist %}
        <tr>
            <td>{{ p.id }}</td>
            <td>{{ p.title }}</td>
            <td align="center">
                <div style="width:210px; height:100px;">
                {% load staticfiles %}
                <img src="{% static p.name %}" height="100%" >
                </div>
            </td>
            <td>{{ p.size }}</td>
            <td>{{ p.time }}</td>
            <td>{{ p.text }}</td>
            <td>
                <a href="{% url 'editpicinfos' p.id %}">编辑</a> |
                <a href="javascript:toDel('{% url 'delpicinfos' p.id %}')">删除</a>
            </td>
        </tr>
        {% endfor %}
    </table>
    <span>共{{ p_num }}页 &nbsp;</span>
    <span>共{{ p_count }}记录 &nbsp;</span>
    {% for pp in pplist %}
        {% if pIndex == pp %}
            {{ pp }}
        {% else %}
            <a href="{% url 'picinfos' pp %}">{{ pp }}</a>
        {% endif %}
    {% endfor %}

    </center>
</body>
</html>